package com.beauty.mapper;

import com.beauty.models.Image;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IImageNoteMapper {
    /**
     *  根据笔记Id获得笔记的图片
     * @param noteId
     * @return
     */
    @Select("SELECT * FROM image WHERE noteId = #{noteId}")
    List<Image> selectImagesByNoteId(String noteId);

    /**
     *  插入图片
     * @param id
     * @param url
     * @param createDate
     * @param noteId
     */
    @Select("INSERT INTO image VALUES (#{id},#{url},#{createDate},#{noteId})")
    void insertImages(String id, String url, long createDate, String noteId);
}
